package manager.dao;

import manager.bean.Order;
import manager.util.JDBC;

import java.util.List;

public class OrderDao {
    public List<Order> getOrder(String sql, Object... params) {
        List<Order> list = JDBC.query(sql,Order.class,params);
        return list;
    }
    public int deleteOrder (String sql,Object... params){
        int count = JDBC.delete(sql,params);
        return count;
    }
    public int addOrder(String sql,Object... params){
        int count = JDBC.insert(sql,params);
        return count;
    }
    public int editOrder(String sql,Object... params){
        int count = JDBC.update(sql,params);
        return count;
    }
    public int countOrder(String sql,Object... params){
        int count = JDBC.queryNum(sql,params);
        return count;
    }
}
